package com.cloudcc.mobile.weight.ui;

import android.graphics.Canvas;
import android.graphics.Rect;

public class UserLogoDrawableRect extends UserLogoDrawable {

	public UserLogoDrawableRect(int backgroundColor, int textColor, String name) {
		super(backgroundColor, textColor, name);
	}
	
	
	@Override
	public void draw(Canvas canvas) {
		Rect bounds = getBounds();
		canvas.drawRect(bounds, mPaint);
		mTextPaint.setTextSize(mRadius*2/3);
		canvas.drawText(name,bounds.centerX(),bounds.centerY()+mTextPaint.getTextSize()/2-2, mTextPaint);
	}

}
